# 所有数的和
def He(*hh):
    cont = 0
    for i in hh:
        cont += i
    return cont


# 所有奇数
def ji(con):
    list_a = list()
    for i in con:
        if i % 2:
            list_a.append(i)
    return list_a


# 所有value取前2位
def dict_list(dicts):
    names = dict()
    for key, value in dicts.items():
        names[key] = value[:2]
    return names


# 输入两个数  求之间的和
def sumRange(a, b):
    return sum(range(a, b + 1))


# 有100个人200个馒头，大人吃3个，小人3人吃1个，请问大人和小人各多少？
def list_log():
    for a in range(1, 101):
        if a * 3 + (100 - a) * (1 / 3) == 100:
            return (a, 100 - a)


def list_one():
    str = "sunck is a good man ! sunck is a nice man ! sunck is a handsome man ! sunck is a good man ! sunck is a nice man ! sunck is a great man ! sunck is a noble man ! sunck is a cool man !"
    list = str.split(" ")
    dict={}
    for key in list:
        if dict.get(key)==None:
            dict[key]=1
        else:
            dict[key]+=1
    for i in dict:
        print(f"{i}出现的次数：{dict[i]}")

if __name__ == '__main__':
    # print(He(1, 2, 3, 4, 5, 6, 7))

    # a = [1, 2, 3, 4, 5, 6, 7, 8]
    # print(ji(a))

    # dictA={
    #     "name":"dream",
    #     "name2":"ember",
    #     "name3":"emlog",
    #     "name4":"awsl",
    #     "name5":"start",
    # }
    # print(dict_list(dictA))

    # print(sumRange(12,113))
    list_ones = [1, 3, 5, 7, 234, 23, 5, 3, 46, 23, 4, 12, 4, 1, 54, 2, 23, 3, 3, 2, 32, 3, 23, 2, 3, "Str", "Str", "z",
                 "s", "f", "f"]
    list_one()

    pass
